package com.recycle.system.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.recycle.common.annotation.Excel;
import com.recycle.common.core.domain.BaseEntity;

/**
 * 政策信息对象 policy
 *
 * @author recycle
 * @date 2023-03-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("policy")
public class Policy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 政策id */
    @Excel(name = "政策编号")
    private Long policyId;

    /** 政策发布者 */
    @Excel(name = "政策发布者")
    private String publisher;

    /** 政策标题 */
    @Excel(name = "政策标题")
    private String titile;

    /** 政策内容 */
    @Excel(name = "政策内容")
    private String content;

    /** 关键字 */
    @Excel(name = "关键字")
    private String keyword;

    /** 政策类型 */
    @Excel(name = "政策类型")
    @TableField(value = "type_name")
    private String typeName;

    /** 公布日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "公布日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishTime;



    /** 状态(0=上架中,1=已下架) */
    @Excel(name = "状态", readConverterExp = "0=上架中,1=已下架")
    private Long status;

    public void setPolicyId(Long policyId)
    {
        this.policyId = policyId;
    }

    public Long getPolicyId()
    {
        return policyId;
    }
    public void setPublisher(String publisher)
    {
        this.publisher = publisher;
    }

    public String getPublisher()
    {
        return publisher;
    }
    public void setTitile(String titile)
    {
        this.titile = titile;
    }

    public String getTitile()
    {
        return titile;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setKeyword(String keyword)
    {
        this.keyword = keyword;
    }

    public String getKeyword()
    {
        return keyword;
    }
    public void setTypeName(String typeName)
    {
        this.typeName = typeName;
    }

    public String getTypeName()
    {
        return typeName;
    }
    public void setPublishTime(Date publishTime)
    {
        this.publishTime = publishTime;
    }

    public Date getPublishTime()
    {
        return publishTime;
    }

    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("policyId", getPolicyId())
            .append("publisher", getPublisher())
            .append("titile", getTitile())
            .append("content", getContent())
            .append("keyword", getKeyword())
            .append("typeName", getTypeName())
            .append("publishTime", getPublishTime())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
